package com.sgz.test.bean.model;

import com.sgz.test.bean.Annotation.MyAnnotation;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: sunguangzhu
 * Date: 13-8-7
 * Time: 上午10:09
 * To change this template use File | Settings | File Templates.
 */
public class ReflectBean extends Object {
    @MyAnnotation(comments = "id")
    private Long id;
    @MyAnnotation(comments = "name")
    private String name;
    @MyAnnotation(comments = "name2")
    public String name2="initValue";
    @MyAnnotation(comments = "flag")
    public Boolean flag = false;
    @MyAnnotation(comments = "enum")
    public EnumElement enumElement;
    @MyAnnotation(comments = "complexBean")
    public ComplexBean complexBean;
    private List<String> list;
    @MyAnnotation(comments = "异常测试")
    <E extends RuntimeException> void genericThrow() throws E {

    }
    @MyAnnotation(comments = "可变参数测试")
    public void varArsg(Object...params){

    }
    public ReflectBean() {
    }

    /**
     * @param id
     * @param name
     */
    public ReflectBean(Long id, String name) {
        this.id = id;
        this.name = name;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public String getName2() {
        return name2;
    }

    public void setName2(String name2) {
        this.name2 = name2;
    }

    public Boolean getFlag() {
        return flag;
    }

    public void setFlag(Boolean flag) {
        this.flag = flag;
    }

    public EnumElement getEnumElement() {
        return enumElement;
    }

    public void setEnumElement(EnumElement enumElement) {
        this.enumElement = enumElement;
    }

    public ComplexBean getComplexBean() {
        return complexBean;
    }

    public void setComplexBean(ComplexBean complexBean) {
        this.complexBean = complexBean;
    }

    public List<String> getList() {
        return list;
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "id= " + this.id + " name= " + this.name;    //To change body of overridden methods use File | Settings | File Templates.
    }


}
